package com.xms.datacore.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Collection;
import java.util.List;
import java.util.UUID;

/**
 * <p>
 * IFinderService
 * </p>
 *
 * @author migo
 * @since 2021/9/2
 */
public interface IFinderService<T> {
    IService<T> getService();

    T getById(UUID id);

    List<T> getByIds(Collection<UUID> idList);

    T getOne(Wrapper<T> queryWrapper);

    int count();

    int count(Wrapper<T> queryWrapper);

    List<T> list(Wrapper<T> queryWrapper);

    List<T> list(LambdaQueryWrapper<T> queryWrapper, int limit);

    List<T> all();

    <E extends IPage<T>> E page(E page, Wrapper<T> queryWrapper);

    <E extends IPage<T>> E page(E page);
}
